
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, target-densityDpi=device-dpi" />
    <!-- 微软的老式浏览器 -->
    <meta name="MobileOptimized" content="320">
    <!-- 启用360浏览器的极速模式(webkit) – -->
    <meta name="renderer" content="webkit">
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
    <meta name="HandheldFriendly" content="true">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <!-- UC强制全屏 -->
    <meta name="full-screen" content="yes">
    <!-- QQ强制全屏 -->
    <meta name="x5-fullscreen" content="true">
    <!-- UC应用模式 若开启长按无法复制链接-->
    <!--meta name="browsermode" content="application"-->
    <!-- QQ应用模式 -->
    <meta name="x5-page-mode" content="app">
    <!--网站开启对web app程序的支持-->
    <meta name="apple-touch-fullscreen" content="yes">
    <!--在web app应用下状态条（屏幕顶部条）的颜色-->
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!-- windows phone 点击无高光 -->
    <meta name="msapplication-tap-highlight" content="no">
    <!--移动web页面是否自动探测电话号码-->
    <!--<meta http-equiv="x-rim-auto-match" content="none">-->
    <!--手机号码显示为拨号链接-->
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Cache-Control" content="max-age=300" />
    <meta http-equiv="Expires" content="300" />
    <title>8号金融街-红岭创投</title>
    <script src="__PUBLIC__js/common.js"></script>
    <link rel="stylesheet" href="__PUBLIC__css/reset.css">
    <link rel="stylesheet" href="__PUBLIC__assets/swiper/css/swiper.min.css">
    <script src="__PUBLIC__js/jquery.min.js"></script>
    <script src="__PUBLIC__layer_m/layer.js"></script>
    <script src="__PUBLIC__js/md5.js"></script>
    <script src="__PUBLIC__assets/swiper/js/swiper.jquery.min.js"></script>
	<link rel="stylesheet" href="__PUBLIC__css/push-hand.css">
	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
        <style type="text/css">
        .footer{
            display: none;
        }
        </style>
    <script type="text/javascript">
         $(function(){
                IsPC()
            })
            function IsPC() {
                var userAgentInfo = navigator.userAgent;
                var Agents = ["Android", "iPhone",
                            "SymbianOS", "Windows Phone",
                            "iPad", "iPod"];
                var flag = true;
                for (var v = 0; v < Agents.length; v++) {
                    if (userAgentInfo.indexOf(Agents[v]) > 0) {
                        flag = false;
                        break;
                    }
                }
				
				var tag = "{$_GET['tag']}"
				if(flag && tag){
					 location.href="http://www.8hjie.com/home/recommend/push_hand/tag/"+tag+"/id/{$_GET['id']}"
				}
                
				if(flag && !tag){
                    location.href="http://www.8hjie.com/home/recommend/push_hand/id/{$_GET['id']}"
                }
            }

    </script>

</head>
<body>

        

      <div class="content">
	  <if condition="$_GET[tag] eq 'phyt'">
		<img src="__PUBLIC__images/phyt_hand.png">

		<else/>
		
			<img src="__PUBLIC__images/push-hand.png">
		</if>
	
        <div class="btn">

        <div class="form-row">
            <input class="telephone"  type="text" placeholder="输入手机号" />
        </div>


            <div class="form-row">
              <span>
                  <input class="telephone code" type="text" placeholder="输入验证码" />
                  <button type="button" send='1' class="btn-sms get-verify-code" onclick="getcode(this)">获取短信</button>
              </span>
          </div>

 
          <button class="invest">去投资拿返利</button>
        </div>
      </div>
</body>
</html>
    <script>
   
              
        $('.invest').click(function() {
             var index = layer.open({type: 2});
            if ($('.telephone').val().match(/^1[34578]\d{9}$/)) {
                var tag ="{$_GET['tag']}";
                var phone = $('.telephone').val();
                var code = $('.code').val();
                var id = "{$_GET['id']}";
                $.post('{:U("User/fast_register")}',{
                    phone:phone,
                    id:id,
                    code:code,
                    tag :tag,
                },function(res){
				console.log(res)
                    if(res.err==0){
					layer.close(index)
						if(res.msg==1){
                            layer.open({
                            content:"抱歉！该号码已在平台注册，请更换号码再继续！"
                            ,skin: 'msg'
                            ,time: 2 //2秒后自动关闭
                            });
                        }else{
                            var path = res.url;
                            location.href=path
                        }

                    }else{
                        layer.open({
                            content: res.msg
                            ,skin: 'msg'
                            ,time: 2 //2秒后自动关闭
                        });
                    }
                })
            }else{
                    layer.close(index)
                    layer.open({
                        content: '手机号码格式错误'
                        ,skin: 'msg'
                        ,time: 2 //2秒后自动关闭
                    });
            };
        });
         //获取验证码
        function getcode(obj){
        var send = $(obj).attr('send');
            if(send){
                var phone = $('.telephone').val();
                $.post("{:U('User/checkphone')}",{
                    phone:phone,
                },function(res){
                    if(res.err==1){
                       checkphone =false;
                         layer.open({
                            content: '该手机号码已注册！'
                            ,skin: 'msg'
                            ,time: 1 //2秒后自动关闭
                          });
                    }else{
                       event_send_sms()
                    }
                })

               
            }
        }

          //验证码计时
        var timer = 60;
        function codeTimer()
        {
            timer--;
            if(timer > 0){
                $('.get-verify-code').text( timer + 's');
                $('.get-verify-code').attr("send",0);
                setTimeout('codeTimer()', 1000);
            }else{
                $('.get-verify-code').text('获取验证码');
                $('.get-verify-code').attr("send",1);
                timer = 60;
            }
        }

        //发送短信
        function event_send_sms(){
            console.log(41)
            var postData={
                 phone:$('.telephone').val(),
            }
            if(timer >= 60){
                var phone = $("#phoneN").val();
                    $(this).attr('disabled', 'disabled');
                    $.ajax({
                        url:'{:U("User/no_code_send")}',
                        data:postData,
                        type:"post",
                        dataType:"json",
                        success:function(d){
                            if(d.err == 0){
                                codeTimer();
                            }else{
                                 layer.open({
                                    content: d.msg
                                    ,skin: 'msg'
                                    ,time: 1 //2秒后自动关闭
                                  });
                            }
                        }
                    });
                
            }
        }
		var title="送你现金返利，来{$platform.name}一起安心理财！首投可得688元！"
        var desc = '精选优质理财产品，安全度更高、总收益更多、让投资变得更容易，来{$platform.name}一起理财吧~！'
        var link=window.location.href
        var imgUrl='http://www.8hjie.com/App/Home/Public/images/wx_fx.jpg' 
			    wx.config({
                // debug: true,
                appId: '{$signPackage.appId}',
                timestamp: {$signPackage.timestamp},
                nonceStr:'{$signPackage.nonceStr}',
                signature:'{$signPackage.signature}',
                jsApiList:[
                'checkJsApi',
                'onMenuShareTimeline',
                'onMenuShareAppMessage',
                'onMenuShareQQ',
                'onMenuShareWeibo'
                ]
        })
        ;


        wx.ready(function () {

            // 1 判断当前版本是否支持指定 JS 接口，支持批量判断

            wx.checkJsApi({

                jsApiList: [

                    'getNetworkType',

                    'previewImage',

                    'onMenuShareTimeline',

                    'onMenuShareAppMessage',

                    'onMenuShareQQ',

                    'onMenuShareWeibo'

                ],

                success: function (res) {

                    //   alert(JSON.stringify(res));

                }

            });

            var shareData = {

                title: title,

                desc: desc,

                link: link,

                imgUrl:imgUrl, 


            };

            wx.onMenuShareAppMessage(shareData);

            wx.onMenuShareTimeline(shareData);

            wx.onMenuShareQQ(shareData);

            wx.onMenuShareWeibo(shareData);

        });

        wx.error(function (res) {

         //   alert(res.errMsg);

        });

		
    </script>